import {
  IsNotEmpty,
  IsNumber,
  IsOptional,
  IsString,
  MaxLength,
  MinLength,
} from 'class-validator';

export class CreateMenuDto {
  @IsNotEmpty()
  @IsString()
  @MinLength(2)
  @MaxLength(10)
  name: string;

  @IsNotEmpty()
  path: string;

  @IsNotEmpty()
  type: 'page' | 'directory';

  @IsOptional()
  icon?: string;

  @IsOptional()
  @IsNumber()
  parentId?: number; //父级菜单id

  // @IsOptional()
  // @IsString()
  // systemFlag?: string; //系统标识
}
